<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/shenpi/goods_request/goods_request.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/shenpi/goods_request/goods_request.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: '审批',
                name: 'goods_request/goods_request',
                url: "/goods_request/",
                sortName: "id"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'id',title:'主键',type:'int',width:120,readonly:true,require:true,align:'left',sort:true},
                       {field:'goods_name',title:'货物名称',type:'string',width:220,require:true,align:'left'},
                       {field:'goods_type',title:'类型',type:'string',width:120,align:'left'},
                       {field:'material',title:'材质',type:'string',width:120,align:'left'},
                       {field:'specification',title:'规格',type:'string',width:120,align:'left'},
                       {field:'quantity',title:'数量',type:'int',width:110,require:true,align:'left'},
                       {field:'usage_description',title:'用途描述',type:'string',width:110,align:'left'},
                       {field:'applicant',title:'申请人',type:'string',width:110,require:true,align:'left'},
                       {field:'expected_delivery_date',title:'期望交付日期',type:'datetime',width:150,require:true,align:'left',sort:true},
                       {field:'remarks',title:'备注',type:'string',width:110,align:'left'},
                       {field:'create_time',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'approver',title:'审批人',type:'string',width:110,align:'left'},
                       {field:'status',title:'状态',type:'string',width:110,align:'left'},
                       {field:'operation',title:'操作',type:'string',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
